<?php

use App\Models\User;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Query\Expression;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('blueprint', function (Blueprint $table) {
            $table->id();
//            $table->bigIncrements('idsss');
            $table->bigInteger('votes');
            $table->binary('photo');
            $table->binary('data1', length: 16); // VARBINARY(16)
            $table->binary('data2', length: 16, fixed: true); // BINARY(16)
            $table->boolean('confirmed');
            $table->char('name', length: 100);
            $table->dateTimeTz('created_at1', precision: 0);
            $table->dateTime('created_at2', precision: 0);
            $table->date('created_at3');
            $table->decimal('amount1', total: 8, places: 2);
            $table->double('amount2');
            $table->enum('difficulty', ['easy', 'hard']);
            $table->float('amount3', precision: 53);
            $table->foreignId('user_id');
//            $table->foreignIdFor(User::class);
            $table->foreignUlid('user_id1');
            $table->foreignUuid('user_id2');
            $table->geography('coordinates', subtype: 'point', srid: 4326);
            $table->geometry('positions', subtype: 'point', srid: 0);
//            $table->increments('id1');
            $table->integer('votes7');
            $table->ipAddress('visitor');
            $table->json('options');
            $table->jsonb('options1');
            $table->longText('description');
            $table->macAddress('device');
            $table->longText('data5')->charset('binary'); // LONGBLOB
            $table->mediumInteger('votes1');
//            $table->mediumIncrements('id2');
            $table->mediumText('description1');
            $table->mediumText('data')->charset('binary'); // MEDIUMBLOB
            $table->morphs('taggable');
//            $table->nullableTimestamps(precision: 0);
            $table->nullableMorphs('taggable1');
            $table->nullableUlidMorphs('taggable2');
            $table->nullableUuidMorphs('taggable3');
            $table->rememberToken();
            $table->set('flavors', ['strawberry', 'vanilla']);
//            $table->smallIncrements('id3');
            $table->smallInteger('votes8');
            $table->softDeletesTz('deleted_at1', precision: 0);
            $table->softDeletes('deleted_at2', precision: 0);
            $table->string('name2', length: 100);
            $table->text('description2');
            $table->text('data6')->charset('binary'); // BLOB
            $table->timeTz('sunrise', precision: 0);
            $table->time('sunrise1', precision: 0);
            $table->timestampTz('added_at', precision: 0);
            $table->timestamp('added_at1', precision: 0);
            $table->timestampsTz(precision: 0);
//            $table->timestamps(precision: 0);
//            $table->tinyIncrements('id4');
            $table->tinyInteger('votes99');
            $table->tinyText('notes');
            $table->tinyText('data7')->charset('binary'); // TINYBLOB
            $table->unsignedBigInteger('votes2');
            $table->unsignedInteger('votes3');
            $table->unsignedMediumInteger('votes4');
            $table->unsignedSmallInteger('votes5');
            $table->unsignedTinyInteger('votes6');
            $table->ulidMorphs('taggable4');
            $table->uuidMorphs('taggable5');
            $table->ulid('id7');
            $table->uuid('id8');
            $table->year('birth_year');
            $table->string('email')->nullable();
            $table->json('movies')->default(new Expression('(JSON_ARRAY())'));
            $table->string('email222')->unique();
            $table->unique('email');
            $table->index(['id', 'created_at1']);
            $table->unique('email', 'unique_email');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('blueprint');
    }
};
